Virtual machine placement with automatic deployment error recovery

ABSTRACT

Embodiments perform automatic selection of hosts and/or datastores for deployment of a plurality of virtual machines (VMs) while monitoring and recovering from errors during deployment. Resource constraints associated with the VMs are compared against resources or characteristics of available hosts and datastores. A VM placement engine selects an optimal set of hosts/datastores and initiates VM creation automatically or in response to administrator authorization. During deployment, available resources are monitored enabling dynamic improvement of the set of recommended hosts/datastores and automatic recovery from errors occurring during deployment.

CROSS-REFERENCE TO RELATED APPLICATION(S)

This application is a continuation application of and claims the benefitof U.S. patent application Ser. No. 13/463,563, filed May 3, 2012, whichis incorporated herein by reference.

BACKGROUND

Some existing systems perform operations on virtual machines (VMs) inresponse to manual input from administrators. One or more VMs may becreated, cloned, deployed, or relocated on destination hosts anddestination datastores specified by the administrators. For example,operations may be performed on VMware's vApp (e.g., a logical entityrepresenting one or more VMs) and VMware's VirtualAppliance (e.g., a VMimage). The administrators select suitable destination hosts anddestination datastores by manually scanning available hosts/datastoresand selecting the most suitable candidates. For example, when scanningthe available hosts/datastores, administrators compare the resourceconstraints of the VMs to be created with the resources available toeach of the available hosts/datastores. Some of the exemplary resourceconstraints or characteristics include disk space, processor, memory,network constraints (e.g., port group availability and configuration),and host compatibility (e.g., some VMs cannot be cloned or deployed ontoparticular host and datastore versions).

Even if the administrators select compatible candidate hosts/datastores,it is difficult for the administrators to evaluate and select the bestcandidate hosts/datastores (e.g., ones that will execute the VMs withoutany performance bottlenecks). Additionally, the resources of thehosts/datastores change in real-time, sometimes rendering unsuitable thehosts/datastores that were previously suitable and selected by theadministrators. When attempting to clone or deploy large numbers of VMsat one time using batch operations, administrators often end upselecting hosts/datastores that are overloaded or resource constrained.Further, with some of the existing systems, errors occurring duringcreation or deployment of the VMs require manual intervention from theadministrators. In datacenters with large numbers of hosts, selectingthe suitable host/datastore candidates can be complex, tedious, timeconsuming, and error prone with sub-optimal host/datastore selection anddeployment.

SUMMARY

One or more embodiments described herein automatically select candidatehosts and candidate datastores for deployment of a plurality of virtualmachines (VMs). A placement engine receives a request to select, for aplurality of VMs, candidate hosts and candidate datastores. Theplacement engine selects the candidate hosts and the candidatedatastores based on resource requirements for the plurality of VMs andavailable resources. During deployment of the plurality of VMs, theplacement engine updates the selected candidate hosts and/or candidatedatastores based on a re-assessment of the available resources.

To facilitate automatic error recovery during deployment, embodimentsdescribed herein maintain a status log describing deployment of theplurality of VMs. If a deployment failure is detected, the placementengine resolves the failure and continues with deployment using themaintained status log.

This summary introduces a selection of concepts that are described inmore detail below. This summary is not intended to identify essentialfeatures, nor to limit in any way the scope of the claimed subjectmatter.

BRIEF DESCRIPTION OF THE DRAWINGS

FIG. 1 is a block diagram of an exemplary host computing device.

FIG. 2 is a block diagram of virtual machines (VMs) that areinstantiated on a computing device, such as the host computing deviceshown in FIG. 1.

FIG. 3 is a block diagram of an exemplary system for selecting hosts anddatastores on which to deploy a plurality of VMs.

FIG. 4 is a block diagram of an exemplary computing device forimplementing a VM placement engine.

FIG. 5 is a flowchart of an exemplary method performed by the VMplacement engine to select candidate hosts and candidate datastores fora plurality of VMs.

FIG. 6 is a flowchart of an exemplary method performed by the VMplacement engine to manage error recovery during deployment of aplurality of VMs.

FIG. 7 is a flowchart of an exemplary method performed by the VMplacement engine to determine an optimized host list for a plurality ofVMs.

FIG. 8 is a flowchart of an exemplary method performed by the VMplacement engine to manage the deployment status of a plurality of VMs.

FIG. 9 is a flowchart of an exemplary method performed by the VMplacement engine to manage deployment of a plurality of VMs.

FIG. 10 is a flowchart of an exemplary method in which an administratoroverrides recommended candidate hosts and candidate datastores.

FIG. 11 is a flowchart of an exemplary method performed by the VMplacement engine to implement a post-deployment VM integrity check.

FIG. 12 is a flowchart of an exemplary method performed by the VMplacement engine to recover from failure of the VM placement engineduring VM deployment.

FIG. 13 is a flowchart of an exemplary method performed by the VMplacement engine to recover from failure of a candidate host duringvirtual application deployment.

FIG. 14 is a flowchart of an exemplary method performed by the VMplacement engine to recover from failure of a source host during VMdeployment.

FIG. 15 is a flowchart of an exemplary method performed by the VMplacement engine to recover from failure of a candidate host during VMdeployment.

FIG. 16 is a flowchart of an exemplary method performed by the VMplacement engine to recover from permanent failure of a candidatedatastore during VM deployment.

FIG. 17 is a flowchart of an exemplary method performed by the VMplacement engine to recover from transient failure of a candidatedatastore during VM deployment.

FIGS. 18-20 are block diagrams of various examples of the VM placementengine selecting and deploying a plurality of VMs.

FIG. 21 is a block diagram of the selection of clustered hosts tocontain VMs.

FIG. 22 is a block diagram of the cloning of a vApp onto two hosts.

FIG. 23 is a block diagram of the response of the VM placement engine tofailure of one of the hosts shown in FIG. 22.

Corresponding reference characters indicate corresponding partsthroughout the drawings.

DETAILED DESCRIPTION

Embodiments described herein facilitate the automatic selection of hosts314 and/or datastores 316 for deployment of a plurality of virtualmachines (VMs). In some embodiments, a VM placement engine 310automatically chooses an optimized set of recommended candidate hosts314 and datastores 316 for placing the VMs based at least on acomparison of VM resource constraints and available resources.Accordingly, manual provisioning and configuration effort (e.g., by anadministrator 402) is reduced. Further, administrator 402 is isolated orshielded from the details of host/datastore selection during large batchoperations.

VM placement engine 310 further operates to deploy the VMs, monitor thedeployment, and automatically detect and recover from deployment errors.In some embodiments, VM placement engine 310 has an automatic mode and amanual mode for implementing the recommendations. In automatic mode, VMplacement engine 310 provides optimized host/datastore recommendationsand starts VM creation operations without input or intervention fromadministrator 402. In manual mode, VM placement engine 310 providesoptimized host/datastore recommendations for review by administrator 402before starting VM creation operations.

Embodiments of the disclosure release administrator 402 from the complexand tedious decisions involving in choosing the best or optimal hosts314 and datastores 316 to hold the VMs to be created. Further, VMplacement engine 310 monitors the requested tasks and availableresources during VM operations (e.g., cloning, creation, deployment,relocation, etc.). With an up-to-date assessment of the availableresources, VM placement engine 310 is also able to take advantage ofdynamic changes in host/datastore resources to improve the set ofrecommended hosts/datastores during deployment, implement load balancingmore evenly during deployment, and perform error handling duringdeployment by anticipating, detecting, and recovering from errors. Forexample, if one of hosts 314 or datastores 316 fails during deployment,VM placement engine 310 automatically attempts to find alternatehosts/datastores on which to restart failed VM operations.

FIG. 1 is a block diagram of an exemplary host computing device 100.Host computing device 100 includes a processor 102 for executinginstructions. In some embodiments, executable instructions are stored ina memory 104. Memory 104 is any device allowing information, such asexecutable instructions, to be stored and retrieved. For example, memory104 may include one or more random access memory (RAM) modules, flashmemory modules, hard disks, solid state disks, and/or optical disks.

Host computing device 100 may include a user interface device 110 forreceiving data from a user 108 and/or for presenting data to user 108.User 108 may interact indirectly with host computing device 100 viaanother computing device such as VMware's vCenter Server or othermanagement device. User interface device 110 may include, for example, akeyboard, a pointing device, a mouse, a stylus, a touch sensitive panel(e.g., a touch pad or a touch screen), a gyroscope, an accelerometer, aposition detector, and/or an audio input device. In some embodiments,user interface device 110 operates to receive data from user 108, whileanother device (e.g., a presentation device) operates to present data touser 108. In other embodiments, user interface device 110 has a singlecomponent, such as a touch screen, that functions to both output data touser 108 and receive data from user 108. In such embodiments, userinterface device 110 operates as a presentation device for presentinginformation to user 108. In such embodiments, user interface device 110represents any component capable of conveying information to user 108.For example, user interface device 110 may include, without limitation,a display device (e.g., a liquid crystal display (LCD), organic lightemitting diode (OLED) display, or “electronic ink” display) and/or anaudio output device (e.g., a speaker or headphones). In someembodiments, user interface device 110 includes an output adapter, suchas a video adapter and/or an audio adapter. An output adapter isoperatively coupled to processor 102 and configured to be operativelycoupled to an output device, such as a display device or an audio outputdevice.

Host computing device 100 also includes a network communicationinterface 112, which enables host computing device 100 to communicatewith a remote device (e.g., another computing device) via acommunication medium, such as a wired or wireless packet network. Forexample, host computing device 100 may transmit and/or receive data vianetwork communication interface 112. User interface device 110 and/ornetwork communication interface 112 may be referred to collectively asan input interface and may be configured to receive information fromuser 108.

Host computing device 100 further includes a storage interface 116 thatenables host computing device 100 to communicate with one or more ofdatastores 316, which store virtual disk images, software applications,and/or any other data suitable for use with the methods describedherein. In exemplary embodiments, storage interface 116 couples hostcomputing device 100 to a storage area network (SAN) (e.g., a FibreChannel network) and/or to a network-attached storage (NAS) system(e.g., via a packet network). The storage interface 116 may beintegrated with network communication interface 112.

FIG. 2 depicts a block diagram of virtual machines 235 ₁, 235 ₂ . . .235 _(N) that are instantiated on host computing device 100, which maybe referred to as a host computing device or simply host 314. Hostcomputing device 100 includes a hardware platform 205, such as an x86architecture platform. Hardware platform 205 may include processor 102,memory 104, network communication interface 112, user interface device110, and other input/output (I/O) devices, such as a presentation device106 (shown in FIG. 1). A virtualization software layer, also referred tohereinafter as a hypervisor 210, is installed on top of hardwareplatform 205.

The virtualization software layer supports a virtual machine executionspace 230 within which multiple virtual machines (VMs 235 ₁-235 _(N))may be concurrently instantiated and executed. Hypervisor 210 includes adevice driver layer 215, and maps physical resources of hardwareplatform 205 (e.g., processor 102, memory 104, network communicationinterface 112, and/or user interface device 110) to “virtual” resourcesof each of VMs 235 ₁-235 _(N) such that each of VMs 235 ₁-235 _(N) hasits own virtual hardware platform (e.g., a corresponding one of virtualhardware platforms 240 ₁-240 _(N)), each virtual hardware platformhaving its own emulated hardware (such as a processor 245, a memory 250,a network communication interface 255, a user interface device 260 andother emulated I/O devices in VM 235 ₁). Hypervisor 210 may manage(e.g., monitor, initiate, and/or terminate) execution of VMs 235 ₁-235_(N) according to policies associated with hypervisor 210, such as apolicy specifying that VMs 235 ₁-235 _(N) are to be automaticallyrestarted upon unexpected termination and/or upon initialization ofhypervisor 210. In addition, or alternatively, hypervisor 210 may manageexecution VMs 235 ₁-235 _(N) based on requests received from a deviceother than host computing device 100. For example, hypervisor 210 mayreceive an execution instruction specifying the initiation of executionof first VM 235 ₁ from a management device via network communicationinterface 112 and execute the execution instruction to initiateexecution of first VM 235 ₁.

In some embodiments, memory 250 in first virtual hardware platform 240 ₁includes a virtual disk that is associated with or “mapped to” one ormore virtual disk images stored in memory 104 (e.g., a hard disk orsolid state disk) of host computing device 100. The virtual disk imagerepresents a file system (e.g., a hierarchy of directories and files)used by first virtual machine 235 ₁ in a single file or in a pluralityof files, each of which includes a portion of the file system. Inaddition, or alternatively, virtual disk images may be stored in memory104 of one or more remote computing devices 100, such as in a storagearea network (SAN) configuration. In such embodiments, any quantity ofvirtual disk images may be stored by the remote computing devices 100.

Device driver layer 215 includes, for example, a communication interfacedriver 220 that interacts with network communication interface 112 toreceive and transmit data from, for example, a local area network (LAN)connected to host computing device 100. Communication interface driver220 also includes a virtual bridge 225 that simulates the broadcastingof data packets in a physical network received from one communicationinterface (e.g., network communication interface 112) to othercommunication interfaces (e.g., the virtual communication interfaces ofVMs 235 ₁-235 _(N)). Each virtual communication interface for each VM235 ₁-235 _(N), such as network communication interface 255 for first VM235 ₁, may be assigned a unique virtual Media Access Control (MAC)address that enables virtual bridge 225 to simulate the forwarding ofincoming data packets from network communication interface 112. In anembodiment, network communication interface 112 is an Ethernet adapterthat is configured in “promiscuous mode” such that all Ethernet packetsthat it receives (rather than just Ethernet packets addressed to its ownphysical MAC address) are passed to virtual bridge 225, which, in turn,is able to further forward the Ethernet packets to VMs 235 ₁-235 _(N).This configuration enables an Ethernet packet that has a virtual MACaddress as its destination address to properly reach the VM in hostcomputing device 100 with a virtual communication interface thatcorresponds to such virtual MAC address.

Virtual hardware platform 240 ₁ may function as an equivalent of astandard x86 hardware architecture such that any x86-compatible desktopoperating system (e.g., Microsoft WINDOWS brand operating system, LINUXbrand operating system, SOLARIS brand operating system, NETWARE, orFREEBSD) may be installed as guest operating system (OS) 265 in order toexecute applications 270 for an instantiated VM, such as first VM 235 ₁.Virtual hardware platforms 240 ₁-240 _(N) may be considered to be partof virtual machine monitors (VMM) 275 ₁-275 _(N) that implement virtualsystem support to coordinate operations between hypervisor 210 andcorresponding VMs 235 ₁-235 _(N). Those with ordinary skill in the artwill recognize that the various terms, layers, and categorizations usedto describe the virtualization components in FIG. 2 may be referred todifferently without departing from their functionality or the spirit orscope of the disclosure. For example, virtual hardware platforms 240₁-240 _(N) may also be considered to be separate from VMMs 275 ₁-275_(N), and VMMs 275 ₁-275 _(N) may be considered to be separate fromhypervisor 210. One example of hypervisor 210 that may be used in anembodiment of the disclosure is included as a component in VMware's ESXbrand software, which is commercially available from VMware, Inc.

FIG. 3 is a block diagram of an exemplary system for selecting hosts 314and datastores 316 on which to deploy a plurality of virtual machines(VMs). VM placement engine 310 executes on a computing device in asystem such as VMware's vCenter Server. VM placement engine 310receives, as input, a source VM or other description of a plurality ofVMs to be created. The source VM may be, for example, a virtualappliance, a virtual application, a VM, a template, or other VMconfiguration description. VM placement engine 310 creates, clones,deploys, relocates, or performs other operations for a batch of VMs. Forexample, aspects of the disclosure manage threads by determining howmany threads to trigger without overloading VM placement engine 310 withconcurrent tasks, maintaining a status of each running thread, andqueuing remaining threads to be triggered (and when to trigger each ofthe threads).

VM placement engine 310 has access to one or more of hosts 314 such ascandidate hosts, target hosts, destination hosts, or other computingdevices. An exemplary host 314 is VMware's ESX server. Host 314 hasaccess to one or more of datastores 316. Each of datastores 316 iscapable of containing VMs, such as the six (6) VMs illustrated in theexample of FIG. 3.

FIG. 4 is a block diagram of an exemplary computing device 404 forimplementing VM placement engine 310. Administrator 402, or other user108, interacts with computing device 404 to provide requests to performoperations on a batch or other plurality of VMs, such as describedherein. Computing device 404 represents any device executinginstructions (e.g., as application programs, operating systemfunctionality, or both) to implement the operations and functionalityassociated with computing device 404. For example, computing device 404executes instructions to implement VM placement engine 310. Computingdevice 404 may include any computing device or processing unit. Forexample, computing device 404 may represent a group of processing unitsor other computing devices, such as in a cloud computing configuration.

Computing device 404 has at least one processor 406 and a memory area408. Processor 406 includes any quantity of processing units, and isprogrammed to execute computer-executable instructions for implementingaspects of the disclosure. The instructions may be performed byprocessor 406 or by multiple processors executing within computingdevice 404, or performed by a processor external to computing device404. In some embodiments, processor 406 is programmed to executeinstructions such as those illustrated in the figures to implement VMplacement engine 310.

Memory area 408 includes any quantity of computer-readable mediaassociated with or accessible by computing device 404. Memory area 408,or portions thereof, may be internal to computing device 404, externalto computing device 404, or both.

In the example of FIG. 4, memory area 408 further stores an inventory410 of hosts 314 and datastores 316. Inventory 410 may represent atopology of hosts 314 and datastores 316 accessible to computing device404 for performing operations relating to VMs. Inventory 410 may beimplemented in any data structure, such as records in a database.Inventory 410 identifies hosts 314 and datastores 316 via identifiersunique among hosts 314 and datastores 316. Memory area 408 furtherstores resource information 412 for hosts 314 and datastores 316.Resource information 412 includes, but is not limited to, compatibilityinformation, hardware versions, processor type and speed, memoryconfiguration, disk space, memory capacity (e.g., random access memory),or other information describing hosts 314 and/or datastores 316.

In some embodiments, computing device 404 accesses hosts 314, anddatastores 316 associated therewith, via a network 414. Network 414represents any means for communication between computing device 404 andhosts 314 and datastores 316. Aspects of the disclosure are operablewith any network type or configuration.

FIG. 5 is a flowchart of an exemplary method 500 performed by VMplacement engine 310 to select candidate hosts 314 and candidatedatastores 316 for a plurality of VMs. While method 500 is describedwith reference to VM placement engine 310 (shown in FIG. 3), it iscontemplated that method 500 may be performed by any computing device.

At 502, VM placement engine 310 receives a request to select, for aplurality or batch of VMs, one or more candidate datastores 316. Therequest is received from administrator 402, or from an applicationprogram designed to automatically generate the request (as part ofmaintenance operations for a cluster or other group of hosts 314). Therequest defines the quantity of VMs to be created. In some embodiments,the request also identifies at least one of hosts 314 to contain theVMs. For example, the request identifies a datacenter, cluster, orfolder to contain the plurality of VMs to be created. VM placementengine 310 is then limited to selecting candidate datastores 316accessible to the identified host(s) 314. Alternatively or in addition,the request may include an identifier corresponding to a prohibited host314, datacenter, cluster, or folder on which none of the VMs should bedeployed. For example, administrator 402 may intend to remove one ofhosts 314 for maintenance or protect one of hosts 314 that is alreadyrunning critical VMs.

In other embodiments, host 314 is not identified, and VM placementengine 310 is requested to identify at least one of the hosts 314, suchas described below.

At 504, VM placement engine 310 determines the resource requirements forthe plurality of VMs. Exemplary resource requirements include hardwareversion information, memory requirements, processor resources, storagerequirements, network configuration requirements, and other VMconfiguration requirements. In some embodiments, the request identifiesa source VM from which the plurality of VMs are to be created. In suchembodiments, VM placement engine 310 determines the resourcerequirements by scanning or otherwise analyzing the source VM toidentify the resource requirements associated with the source VM. Inother embodiments, the request identifies the resource requirements ofthe plurality of VMs.

At 506, VM placement engine 310 assesses the available resources forcreating the plurality of VMs. For example, VM placement engine 310accesses inventory 410 stored in memory area 408 to identify candidatedatastores 316 (and, optionally, hosts 314 if no host 314 was includedin the request from administrator 402).

At 508, VM placement engine 310 compares the resource requirements ofthe VMs to be created with the available resources to select one or morecandidate datastores 316 (and, optionally, one or more hosts 314 if nohost 314 was included in the request from administrator 402). Such acomparison includes, for example, searching for compatible or matchinghardware versions, memory usage, host compatibility, datastorecompatibility, input/output load, and/or network configuration (e.g.,network port group compatibility or network interface card uplinkspeed). Compatibility may be analyzed by, for example, use of acompatibility chart accessible to VM placement engine 310. Finding amatching port group enables the VMs to access the network, while amatching uplink speed (e.g., network interface card connected to a portgroup) enables fast communication. Additional examples ofhosts/datastore selection are described below with reference to FIGS.18-20.

The selected hosts/datastores represent recommendations from VMplacement engine 310 for creating the VMs. One or more of therecommendations may be presented to administrator 402 for confirmation,authorization, or other approval before deployment (e.g., manual mode)or VM placement engine 310 may automatically begin deployment of one ormore of the VMs without explicit confirmation from administrator 402(e.g., automatic mode). Administrator 402 may accept or reject any, all,or none of the recommended hosts/datastores.

At 510, VM placement engine 310 begins deployment operations for theplurality of VMs. If deployment is complete at 512, the deploymentoperations end at 514. Otherwise, VM placement engine 310 continuallymonitors the available resources and updates the recommendedhosts/datastores based on changes in the available resources. Forexample, VM placement engine 310 updates the assessment of the availableresources at 516. If a more optimal host 314 or datastore 316 has becomeavailable and VM placement engine 310 concludes that the recommendationsshould be revised at 518 based on a comparison between the resourcerequirements and the updated assessment, VM placement engine 310 altersthe selected hosts/datastores at 522. In manual mode, VM placementengine 310 presents the updated recommendations to administrator 402 forconfirmation. In automatic mode, VM placement engine 310 automaticallyalters VM deployment based on the updated recommendations. If VMplacement engine 310 concludes that the recommendations should not berevised at 518, deployment continues at 520. In this manner, VMplacement engine 310 dynamically adjusts to a dynamic resource pool.

Deployment of the VMs may also be delayed, postponed, or otherwisetimed. For example, the request may specify a time (e.g., absolute orrelative) for initiating deployment of the VMs. VM placement engine 310delays deployment until the specified time.

VM placement engine 310 is capable of handling multiple deploymentrequests or jobs simultaneously. In some embodiments, each of therequests has a priority value defining the relative or absolute priorityof each request. VM placement engine 310 orders the requests based onthe priority values and processes the requests based on the associatedpriority values. For example, candidate host/datastore selection isperformed for the requests in order of priority. In an example in whichthere are three administrators 402 in a datacenter, two ofadministrators 402 may have issued requests to deploy 100 VMs on twohost clusters. Without any priority specified by either administrator402, VM placement engine 310 gives equal priority to each of therequests. If the third administrator 402 sends a request with a highpriority value to deploy 30 VMs on another host cluster, VM placementengine 310 begins processing this request at the expense of the othertwo requests already being processed. For example, VM placement engine310 allocates more resources to the high priority request relative tothe other two requests.

During or after deployment of at least one of the VMs, VM placementengine 310 performs a post-deployment integrity check or other errordetection. The post-deployment integrity check includes, for example,comparing a configuration of the deployed VM to the resourcerequirements to confirm that the deployed VM is compliant. Thepost-deployment integrity check also includes, for example, powercycling the deployed VM by briefly powering on and then powering off thedeployed VM to ensure the deployed VM is ready for execution. Additionaldescription of such compliance checks is included below with referenceto FIG. 11.

FIG. 6 is a flowchart of an exemplary method 600 performed by VMplacement engine 310 to manage error recovery during deployment of aplurality of VMs. While method 600 is described with reference to VMplacement engine 310 (shown in FIG. 3), it is contemplated that method600 may be performed by any computing device. In some embodiments, oneor more computer-readable storage media include computer-executableinstructions that, when executed, cause processor 406 to place virtualmachines while implementing error recovery by performing the operationsillustrated in FIG. 6.

At 602, VM placement engine 310 receives a request to select at leastone candidate datastore 316 to contain a plurality of VMs. The requestis received from administrator 402, or from an application programdesigned to automatically generate the request (as part of maintenanceoperations for a cluster or other group of hosts 314). The requestdefines the quantity of VMs to be created. In the example of FIG. 6, therequest also identifies at least one of hosts 314 to contain the VMs.For example, the request identifies a datacenter, cluster, or folder tocontain the plurality of VMs to be created. VM placement engine 310 isthen limited to selecting candidate datastores 316 accessible to theidentified host(s) 314.

In the example of FIG. 6, the request also specifies resourcerequirements associated with the VMs to be created. At 604, VM placementengine 310 selects candidate datastore 316 from datastores 316accessible to host 314 identified in the request. For example, VMplacement engine 310 compares the resource requirements of the VMs to becreated with the available resources (e.g., associated with datastores316 accessible to host 314) to select one or more candidate datastores316. Such a comparison includes, for example, searching for compatibleor matching hardware versions, memory usage, host compatibility,datastore compatibility, input/output load, and/or network configuration(e.g., network port group compatibility). Examples of datastoreselection are described below with reference to FIGS. 18-20.

VM placement engine 310 begins VM deployment at 610 on host 314 andselected candidate datastore 316, and maintains a status log duringdeployment at 612. The status log represents any recordation of thestatus of deployment of the plurality of VMs. VM placement engine 310updates the status log, for example, at the start and conclusion ofdeployment of each of the VMs. In some embodiments, the status log is asingle record, file, or other object storing the status. In otherembodiments, a separate status log is maintained for each VM beingdeployed (e.g., separate records in a database). The status log maycontain entries each identifying one of the VMs, a timestamp, a statusor progress description, and other information. For example, the statuslog may store input received from administrator 402, a source VMidentifier, a source VM host identifier, initial host/datastorerecommendations, deployment status of each VM (e.g., completed orin-progress), and overall job status.

If a deployment failure is detected at any time during deployment (e.g.,such as at 614), VM placement engine 310 relies at least in part on thestatus log to continue with deployment. For example, VM placement engine310 may monitor for failures (e.g., perform a post-deployment integritycheck on each deployed VM) or receive notification of such failures.Examples of deployment failures include source host failure, VMplacement engine 310 failure, candidate host failure, and candidatedatastore 316 failure. Examples failure scenarios are illustrated anddescribed with reference to other figures herein.

At 616, VM placement engine 310 resolves, or otherwise adjusts to, thedetected deployment failure and resumes deployment based on the statuslog. For example, VM placement engine 310 consults the status log toidentify which VMs have not been fully deployed and/or determine theprogress of deployment. Resolving the failure may include removing orcleaning up partially-deployed VMs. Resolving the failure may alsoinclude deleting or otherwise removing VMs that are not compliant (e.g.,those that fail the post-deployment integrity check).

In embodiments in which the detected deployment failure is a failure ofthe destination host during deployment, VM placement engine 310 resolvesthe deployment failure by searching for a new compatible host that hasaccess to the selected candidate datastore. VMs deployed on the failedhost are then re-deployed on the new host. In embodiments in which thedetected deployment failure is a failure of one of the candidatedatastores, VM placement engine 310 resolves the deployment failure byselecting a new candidate datastore accessible to host. VMs deployed onthe failed datastore are then re-deployed on the new candidatedatastore.

After resolving the failure(s), VM placement engine 310 proceeds toresume deployment of the VMs. If deployment is complete at 606,deployment operations cease at 608.

The status log further enables VM placement engine 310 to provideadditional functionality. For example, VM placement engine 310 mayanalyze the status log during deployment to determine how many VMs havebeen deployed, how many VMs are to be deployed, how many VMs arecurrently being deployed, duration of each VM deployment, averagedeployment duration for each of the VMs, and other statistics. In thismanner, VM placement engine 310 is able to estimate, based on themaintained status log, the time remaining to deploy the batch of VMs.

For example, VM placement engine 310 scans the selected hosts/datastoresfor parameters such system load and network bandwidth availability(e.g., from source host to each selected destination host) to determinethe approximate time to complete deployment of one of the VMs. With thisinformation, VM placement engine 310 may estimate a time for completingthe remainder of a batch of VMs. The VM placement dynamically maintainsan assessment of each of the selected hosts/datastores during deploymentand is thus able to dynamically update the estimated completion time inresponse to changing loads, bandwidth constraints, or other issues thatmay affect the selected hosts/datastores.

FIG. 7 is a flowchart of an exemplary method 700 performed by VMplacement engine 310 to determine an optimized host list for a pluralityof VMs. While method 700 is described with reference to VM placementengine 310 (shown in FIG. 3), it is contemplated that method 700 may beperformed by any computing device.

At 702, VM placement engine 310 initiates a VM deployment operation. Forexample, VM placement engine 310 executes to select a set of optimumhosts 314 at 704. If administrator 402 has explicitly selected a clusterat 706, VM placement engine 310 scans through the cluster of hosts 314at 708 to check for host compatibility at 712. If administrator 402 hasnot explicitly identified a cluster at 706, VM placement engine 310scans through inventory 410 of standalone hosts 314 at 710 and checksfor host compatibility at 712. If a selected host 314 is not compatibleat 714, VM placement engine 310 selects another host 314.

If the selected host 314 is compatible at 714 and is a possiblecandidate at 716, VM placement engine 310 adds the selected host 314 toa candidate host list or set at 718. A quantity of selected hosts 314 isincremented at 720 and additional hosts 314 are identified and selected.For example, VM placement engine 310 searches for additional standalonehosts 314 at 722 and at 728, or looks for additional clustered hosts 314at 722 and at 724. After there are no more available standalone hosts314 at 728 or available clustered hosts 314 at 724, VM placement engine310 determines an optimized host list at 726. Processing continues withthe flowchart illustrated in FIG. 8, next described.

FIG. 8 is a flowchart of an exemplary method 800 performed by VMplacement engine 310 to manage the deployment status of a plurality ofVMs. While method 800 is described with reference to VM placement engine310 (shown in FIG. 3), it is contemplated that method 800 may beperformed by any computing device.

After determining the optimized host list in FIG. 7, the load on thecomputing device executing VM placement engine 310 is checked at 802 andVM placement engine 310 executes a deployment function at 804. A statuslog keeps track of deployment data for the VMs at 806 as the VMs aredeployed on hosts 314.

VM placement engine 310 checks the status of deployment tasks at 808and, if any tasks have failed, attempts to re-deploy at 810 the VMsaffected by the failure. If no tasks have failed and there areadditional pending deployment tasks at 812, deployment continues at 804.Otherwise, the deployment operation is complete at 814.

FIG. 9 is a flowchart of an exemplary method 900 performed by VMplacement engine 310 to manage deployment of a plurality of VMs. Whilemethod 900 is described with reference to VM placement engine 310 (shownin FIG. 3), it is contemplated that method 900 may be performed by anycomputing device. The operations illustrated in FIG. 9 represent anexemplary implementation of the deployment function at 804 in FIG. 8.

VM placement engine 310 determines if the VM to be deployed is to beprotected by a particular cluster or cluster type at 904. For example,the VM be requested for deployment in a high availability (HA) cluster,in a cluster with a distributed resource scheduler (DRS), or be subjectto distributed power management (DPM). If so, VM placement engine 310sets a “VM to be enabled with cluster options” flag to TRUE at 906. Ifthe requested type of clustered host 314 is not available at 908, anerror is reported to administrator 402 at 910. Otherwise, a shared oneof datastores 316 is next selected at 912 and resources of the clusteredhost 314 and/or resource are checked at 914. If the resources are notsufficient at 914, an error is reported to administrator 402 at 910.Otherwise, the VM is deployed on the selected host 314 and datastore 316at 916.

If the VM to be deployed is not requested to be associated with aparticular cluster at 904, VM placement engine 310 checks if astandalone host 314 is available at 918. If a standalone host 314 isavailable at 918 or a clustered host 314 is available at 926, VMplacement engine 310 searches for a local one of datastores 316. Iflocal datastore 316 is available at 920 or shared datastore 316 isavailable at 922, VM placement engine 310 proceeds to check forresources at 914 and deploy the VM is the resources are sufficient.Otherwise, an error is reported at 924.

An exemplary block diagram illustrating the deployment of VMs using theexemplary method 900 is shown in FIG. 21. In FIG. 21, the VMs aredeployed on shared logical unit number (LUN) datastores 316 on Host-2and Host-3.

FIG. 10 is a flowchart of an exemplary method 1000 in whichadministrator 402 overrides recommended candidate hosts 314 andcandidate datastores 316. While method 1000 is described with referenceto VM placement engine 310 (shown in FIG. 3), it is contemplated thatmethod 1000 may be performed by any computing device.

VM placement engine 310 accesses requirements for the batch of VMs to becreated at 1002, scans inventory 410 at 1004 to identify candidate hosts314 and datastores 316, and produces a set of the identified candidatehosts 314 and datastores 316 as recommendations in an optimizedhost/datastore list. The optimized host/datastore list is reported toadministrator 402 at 1006. If the list is not modified by administrator402 at 1008, VM placement engine 310 proceeds to deploy the VMs at 1010.

If administrator 402 modifies the list (e.g., one or more of therecommendations) and the modifications are determined by VM placementengine 310 to be feasible at 1012, VM placement engine 310 updates theoptimized list at 1014 and proceeds to deploy the VMs at 1010. If themodifications are determined to not be feasible at 1016, administrator402 is notified or warned at 1016. If administrator 402 does not provideany new changes at 1018, an error is reported at 1020 and deploymentceases. Any new changes from administrator 402 at 1018 are checked forfeasibility at 1012 before becoming part of the optimized list at 1014.

FIG. 11 is a flowchart of an exemplary method 1100 performed by VMplacement engine 310 to implement a post-deployment VM integrity check.While method 1100 is described with reference to VM placement engine 310(shown in FIG. 3), it is contemplated that method 1100 may be performedby any computing device.

VM placement engine 310 begins the post-deployment VM integrity check at1102 by determining if the deployed VM is compliant at 1104. If so, VMplacement engine 310 proceeds to deploy additional VMs at 1106. If not,the deployed VM is considered invalid at 1108, deleted at 1110, andre-deployed at 1112.

FIG. 12 is a flowchart of an exemplary method 1200 performed by VMplacement engine 310 to recover from failure of VM placement engine 310(e.g., represented as VPXD) during VM deployment. While method 1200 isdescribed with reference to VM placement engine 310 (shown in FIG. 3),it is contemplated that method 1200 may be performed by any computingdevice.

With VM deployment in progress at 1202 and after VPXD recovers at 1204,VM placement engine 310 checks the status log (e.g., a database ortable) for unfinished deployment tasks at 1206. If there are no VMplacement engine 310 (VMPE) tasks pending at 1208, deployment continuesat 1210. If there are VM placement engine 310 tasks pending at 1208, VMplacement engine 310 scans through the status log (e.g., a database ortable) at 1212 to obtain information about the pending tasks. Theavailable inventory 410 is scanned at 1214, and information about VMsnot fully deployed is obtained at 1216. Failed and pending VMdeployments are re-started at 1218.

FIG. 13 is a flowchart of an exemplary method 1300 performed by VMplacement engine 310 to recover from failure of a candidate host duringvirtual application (vApp) deployment. A vApp represents one or moreVMs. While method 1300 is described with reference to VM placementengine 310 (shown in FIG. 3), it is contemplated that method 1300 may beperformed by any computing device.

During vApp deployment at 1302, VM placement engine 310 detects orotherwise becomes aware of failure of a destination host or othercandidate host at 1304. If vApp deployment is completed at 1306, VMplacement engine 310 proceeds with the next deployment process at 1308.If the vApp deployment was not complete at 1306 but the vApp is fullydeployed at 1310, VM placement engine 310 searches for a new optimizedhost 314 at 1314 on which to re-deploy the vApp at 1314.

If the vApp was only partially deployed at 1310, VM placement engine 310searches for a new host(s) 314 that have access to the same datastore316 containing other VMs associated with the vApp at 1316. If such a newhost 314 exists, the available resources of new host 314 are compared tothe resource requirements of the vApp VMs at 1320. If the availableresources are sufficient or compatible, VM placement engine 310re-registers the deployed VMs with the new host 314 and deploys pendingVMs on new host 314 at 1322.

If there is no new host 314 at 1316 or no new host 314 with suitableresources at 1320, VM placement engine 310 removes the partiallydeployed VMs at 1318 and searches for a new optimized host 314 at 1312on which to re-deploy the vApp at 1314.

An exemplary block diagram illustrating the response by VM placementengine 310 to failure of host 314 using the exemplary method 1300 isshown in FIG. 22 and FIG. 23. In FIG. 22, VM placement engine 310attempts to multi-clone two vApps from a source vApp having a database(DB), server, and client. For the first clone, VM placement engine 310deploys the DB, server, and client on a datastore associated withHost-2. For the second clone, VM placement engine 310 deploys the DB ona datastore associated with Host-3 and places the server and client on ashared LUN datastore registered to Host-3.

When Host-3 fails as shown in FIG. 23, VM placement engine 310 selects adatastore associated with Host-2 as an alternate candidate forre-deployment of the DB. VM placement engine 310 further re-registersthe server and client to Host-2.

FIG. 14 is a flowchart of an exemplary method 1400 performed by VMplacement engine 310 to recover from failure of a source host 314 duringVM deployment. While method 1400 is described with reference to VMplacement engine 310 (shown in FIG. 3), it is contemplated that method1400 may be performed by any computing device.

During VM deployment at 1402, VM placement engine 310 detects orotherwise becomes aware of an error at 1404. The error is determined tobe failure of source host 314 at 1406. VM placement engine 310 waits fora predefined time-out duration (e.g., 10 minutes) at 1408 beforechecking whether source host 314 has re-connected at 1410. If sourcehost 314 reconnects at 1410, VM placement engine 310 proceeds withdeployment at 1412. Otherwise, without source host 314, VM placementengine 310 ends the deployment process at 1414.

FIG. 15 is a flowchart of an exemplary method 1500 performed by VMplacement engine 310 to recover from failure of one of the candidatehosts 314 during VM deployment. While method 1500 is described withreference to VM placement engine 310 (shown in FIG. 3), it iscontemplated that method 1500 may be performed by any computing device.

During VM deployment at 1502, VM placement engine 310 detects orotherwise becomes aware of an error at 1504. The error is determined tobe failure of the destination host 314 or other candidate host 314 at1506. VM placement engine 310 waits for a predetermined time-outduration (e.g., 10 minutes) at 1508 before checking whether destinationhost 314 has re-connected at 1510. If destination host 314 reconnects at1510, VM placement engine 310 proceeds with deployment at 1512.Otherwise, VM placement engine 310 proceeds to select anotherdestination host 314 at 1514 in order to proceed with VM deployment.

FIG. 16 is a flowchart of an exemplary method 1600 performed by VMplacement engine 310 to recover from permanent failure of candidatedatastore 316 during VM deployment. While method 1600 is described withreference to VM placement engine 310 (shown in FIG. 3), it iscontemplated that method 1600 may be performed by any computing device.

During VM deployment at 1602, VM placement engine 310 detects orotherwise becomes aware of an error at 1604. In the example in FIG. 16,the error is determined to be either permanent device loss at 1606 orfailure of datastore 316 connected to host 314 at 1608. In either event,datastore 316 does not re-connect after a predetermined time-outduration (e.g., 10 minutes) at 1620. VM placement engine 310 proceeds tosearch for a new datastore 316 on the same host 314 at 1622. If there isa new datastore 316 available at 1624, VM placement engine 310 proceedswith VM deployment using host 314 and new datastore 316 at 1626.Otherwise, VM placement engine 310 proceeds to select another host 314at 1628 in order to proceed with VM deployment.

FIG. 17 is a flowchart of an exemplary method 1700 performed by VMplacement engine 310 to recover from transient failure of a candidatedatastore 316 during VM deployment. While method 1700 is described withreference to VM placement engine 310 (shown in FIG. 3), it iscontemplated that method 1700 may be performed by any computing device.

During VM deployment at 1702, VM placement engine 310 detects orotherwise becomes aware of an error at 1704. In the example of FIG. 17,the error is determined to be either a complete host failure at 1706 orfailure of datastore 316 connected to host 314 at 1708. In either event,the failure is temporary as VM placement engine 310 waits for host 314or datastore 316 to restore at 1710. After host 314 or datastore 316restores, VM placement engine 310 obtains information about VMs notfully deployed at 1712. VM placement engine 310 performs cleanup orremoval or invalid or partially deployed VMs at 1714.

Administrator 402 may also request that a batch of VM operations stop orotherwise be interrupted. Rather than requiring administrator 402 tomanually identify and suspend the relevant, in-process VM operations asin some of the existing systems, VM placement engine 310 identifies thestatus of each VM operation via the status log and suspends theidentified VM operations (e.g., allow in-process VM deployments tofinish, yet prevent new VM operations or deployments from triggering orotherwise beginning). Similarly, administrator 402 may request completecancellation of a batch of VM operations. Rather than requiringadministrator 402 to identify every deployed VM and manually remove eachof the deployed VMs as in some of the existing systems, VM placementengine 310 checks the status log to identify each deployed VM and toperform cleanup operations to automatically remove the deployed VMs.

In some embodiments, administrator 402 provides constraints forselecting hosts 314 to contain one of the VMs to be deployed.Administrator 402 may request that VM placement engine 310 preserve athreshold quantity or portion of resources, available post-deployment,on one or more of hosts 314 being evaluated to contain VMs. For example,the request may specify that hosts 314 have at least 10% of processorresources available post-deployment and/or 10% of memory resourcesavailable post-deployment. In this example, if VM placement engine 310has consumed more than 90% of the available processor or memoryresources on a particular host 314, VM placement engine 310 removes thatparticular host 314 from the recommended set of hosts 314, thuspreventing that host 314 from containing additional VMs. If VM placementengine 310 is unable to identify any hosts 314 meeting the constraintsrequested by administrator 402, a warning is sent to administrator 402.

Aspects of the disclosure further provide report generation. Forexample, administrator 402 may request that VM placement engine 310obtain and provide details of deployment tasks (e.g., previous tasks,current tasks, or tasks within a requested date or time range). VMplacement engine 310 searches the status log or other memory store toidentify the requested deployment tasks and to generate a report (e.g.,a deployment report). An exemplary report includes details for eachdeployment task such as the source host, quantity of VMs requested to bedeployed, quantity of VMs actually deployed, destination host(s), errorrecovery details, and/or any other information contained in the statuslog. Administrator 402 may also customize the reports to obtain aparticular subset of the available information, in any format.

ADDITIONAL EXAMPLES

The following scenarios are merely exemplary and not intended to belimiting in any way.

In one scenario, administrator 402 has chosen a destination host 314 anddatastore 316 for creating six (6) VMs in a batch. VM placement engine310 directly starts the clone/deploy operations and creates the six VMson the specified destination host/datastore. In another scenario,administrator 402 has chosen destination hosts 314 but not anydatastores 316. In this example, VM placement engine 310 selectsdatastores 316 by evaluating the compatibility, disk space, and networkconstraints of destination hosts 314. The processor load and memoryusage on destination hosts 314 is also evaluated if administrator 402has chosen to power on the VMs after cloning and deployment. Forexample, VM placement engine 310 may not choose a particular datastore316 if, after cloning, the particular datastore 316 would be left withminimal space (e.g., two gigabytes). Instead, VM placement engine 310may place two VMs on the same datastore 316 that will be left with moredisk space (e.g., fifteen gigabytes) after cloning.

In another scenario, even though a particular one of the hosts 314 hasenough memory and processor resources, VM placement engine 310 does notchoose the particular host 314 to contain one of the VMs because of ahardware incompatibility between the VM version and the version of theparticular host 314.

In still another scenario, administrator 402 has chosen a pool of hosts314 such as a cluster, folder, or datacenter. If there are no resourceor compatibility constraints on these hosts 314, VM placement engine 310distributes the VMs evenly across the pool of hosts 314. For example, ifthere are six VMs to place and three hosts 314 in the pool, VM placementengine 310 clones two VMs onto each host 314.

In FIG. 18, VM placement engine 310 has not chosen Host-3 to place,clone, and/or deploy any of the six VMs due to processor and memoryconstraints. Datastore 1806 of Host-2 has also not been chosen due todue to disk space constraints. Instead, Host-1 and Host-2 have beenchosen to host each of the VMs to be deployed. In this example, Host-1has been selected to place four VMs (e.g., two each datastore) whileHost-2 places two VMs on one datastore.

In FIG. 19, datastore 1902 on Host-3 runs out of disk space after VMplacement engine 310 triggers VM clone and deploy operations. Ratherthan aborting the operations as in some of the existing systems, VMplacement engine 310 detects the error and automatically searches foranother suitable datastore first on the same Host-3 then on other hostsHost-1 and Host-2 if no suitable datastores are available on Host-3. Ifthere are no suitable datastores, VM placement engine 310 logs an error.In this example, the other datastore on Host-3 is not suitable as itonly have ten gigabytes of space, leaving the datastore with no spaceafter cloning/deploying. Thus, datastore 1904 on Host-2 is selected, andVM placement engine 310 re-clones and deploys the VM onto datastore1904.

In FIG. 20, one of the destination hosts (host-3) fails duringdeployment. In this example, VM placement engine 310 has begun deployingthe VMs and, while deployment is in progress, communication between VMplacement engine 310 and Host-3 is lost (e.g., because of a host reboot,hardware failure, or other issue). VM placement engine 310 waits for apredefined duration (e.g., an option configurable by administrator 402)for failed Host-3 to reconnect. If Host-3 reconnects within thepredefined duration, the failed deploy operation would be restarted onHost-3. If, as in the example of FIG. 20, Host-3 fails to reconnect, VMplacement engine 310 reiterates through the remaining hosts Host-1 andHost-2 to try to place the VMs that were supposed to be placed onHost-3. If the resources of the remaining hosts are not suitable, anerror is reported to administrator 402. In this example, however, VMplacement engine 310 selects datastore 2004 on Host-2 and datastore 2008on Host-1 as the alternate hosts/datastores for placing, cloning, anddeploying the two VMs from failed Host-3.

In another example (not shown), VM placement engine 310 is unable tofind sufficient resources for placing all the requested VMs. In such anexample, VM placement engine 310 reports an error but continues todeploy as many of the VMs as possible based on the available resources.

Exemplary Operating Environment

The operations described herein may be performed by a computer orcomputing device. The computing devices communicate with each otherthrough an exchange of messages and/or stored data. A computing devicemay transmit a message as a broadcast message (e.g., to an entirenetwork and/or data bus), a multicast message (e.g., addressed to aplurality of other computing devices), and/or as a plurality of unicastmessages, each of which is addressed to an individual computing device.Further, in some embodiments, messages are transmitted using a networkprotocol that does not guarantee delivery, such as User DatagramProtocol (UDP). Accordingly, when transmitting a message, a computingdevice may transmit multiple copies of the message, enabling thecomputing device to reduce the risk of non-delivery.

Exemplary computer readable media include flash memory drives, digitalversatile discs (DVDs), compact discs (CDs), floppy disks, and tapecassettes. By way of example and not limitation, computer readable mediacomprise computer storage media and communication media. Computerstorage media include volatile and nonvolatile, removable andnon-removable media implemented in any method or technology for storageof information such as computer readable instructions, data structures,program modules or other data. Computer storage media are tangible,exclude propagated data signals, and are mutually exclusive tocommunication media. In some embodiments, computer storage media areimplemented in hardware. Exemplary computer storage media include harddisks, flash drives, and other solid-state memory. In contrast,communication media typically embody computer readable instructions,data structures, program modules, or other data in a modulated datasignal such as a carrier wave or other transport mechanism and includeany information delivery media.

Although described in connection with an exemplary computing systemenvironment, embodiments of the disclosure are operative with numerousother general purpose or special purpose computing system environmentsor configurations. Examples of well-known computing systems,environments, and/or configurations that may be suitable for use withaspects of the disclosure include, but are not limited to, mobilecomputing devices, personal computers, server computers, hand-held orlaptop devices, multiprocessor systems, gaming consoles,microprocessor-based systems, set top boxes, programmable consumerelectronics, mobile telephones, network PCs, minicomputers, mainframecomputers, distributed computing environments that include any of theabove systems or devices, and the like.

Embodiments of the disclosure may be described in the general context ofcomputer-executable instructions, such as program modules, executed byone or more computers or other devices. The computer-executableinstructions may be organized into one or more computer-executablecomponents or modules. Generally, program modules include, but are notlimited to, routines, programs, objects, components, and data structuresthat perform particular tasks or implement particular abstract datatypes. Aspects of the disclosure may be implemented with any number andorganization of such components or modules. For example, aspects of thedisclosure are not limited to the specific computer-executableinstructions or the specific components or modules illustrated in thefigures and described herein. Other embodiments of the disclosure mayinclude different computer-executable instructions or components havingmore or less functionality than illustrated and described herein.

Aspects of the disclosure transform a general-purpose computer into aspecial-purpose computing device when programmed to execute theinstructions described herein.

The embodiments illustrated and described herein as well as embodimentsnot specifically described herein but within the scope of aspects of theinvention constitute exemplary means for monitoring the deployment ofthe plurality of VMs on the selected one or more candidate hosts 314 andthe selected one or more candidate datastores 316, and exemplary meansfor automatic error recovery during the deployment of the plurality ofVMs on the selected one or more candidate hosts 314 and the selected oneor more candidate datastores 316.

At least a portion of the functionality of the various elementsillustrated in the figures may be performed by other elements in thefigures, or an entity (e.g., processor, web service, server, applicationprogram, computing device, etc.) not shown in the figures.

In some embodiments, the operations illustrated in the figures may beimplemented as software instructions encoded on a computer readablemedium, in hardware programmed or designed to perform the operations, orboth. For example, aspects of the disclosure may be implemented as asystem on a chip or other circuitry including a plurality ofinterconnected, electrically conductive elements.

The order of execution or performance of the operations in embodimentsof the disclosure illustrated and described herein is not essential,unless otherwise specified. That is, the operations may be performed inany order, unless otherwise specified, and embodiments of the disclosuremay include additional or fewer operations than those disclosed herein.For example, it is contemplated that executing or performing aparticular operation before, contemporaneously with, or after anotheroperation is within the scope of aspects of the disclosure.

When introducing elements of aspects of the disclosure or theembodiments thereof, the articles “a,” “an,” “the,” and “said” areintended to mean that there are one or more of the elements. The terms“comprising,” “including,” and “having” are intended to be inclusive andmean that there may be additional elements other than the listedelements.

Having described aspects of the disclosure in detail, it will beapparent that modifications and variations are possible withoutdeparting from the scope of aspects of the disclosure as defined in theappended claims. As various changes could be made in the aboveconstructions, products, and methods without departing from the scope ofaspects of the disclosure, it is intended that all matter contained inthe above description and shown in the accompanying drawings shall beinterpreted as illustrative and not in a limiting sense.

We claim:
 1. A system for automatically selecting hosts or datastoresfor deployment of a plurality of virtual machines (VMs), said systemcomprising: a memory area associated with a computing device, saidmemory area storing an inventory of hosts and datastores, said inventorydescribing resources associated with the hosts and datastores; and aprocessor programmed to: store an inventory of hosts and datastores,said inventory describing resources associated with the hosts anddatastores; receive a request to select at least one candidate datastoreor host for a plurality of virtual machines (VMs) for deployment;determine resource requirements for the plurality of VMs; automaticallyselect, for each of the plurality of VMs, the candidate datastore orhost from the inventory of hosts and datastores based on the determinedresource requirements and the resources associated with the inventory ofhosts and datastores; automatically deploy at least one of the pluralityof VMs on the selected candidate datastore or host; monitor theinventory and updating, during deployment of said at least one of theplurality of VMs on the selected candidate datastore or host, theassessment of the resources in the inventory based on changes ofresource availability; and automatically select, during said deployment,another candidate datastore or host based on a comparison of theresource requirements and the updated assessment of the resources in theinventory prior to completion of deployment and complete deployment ofthe at least one of the plurality of VMs on the selected anothercandidate datastore or host.
 2. The system of claim 1, wherein therequest identifies a source VM, the source VM comprising one or more ofthe following: a template VM, a virtual application, a virtualappliance, and a VM configuration description.
 3. The system of claim 2,wherein the processor is programmed to determine the resourcerequirements by determining one or more of the following from theidentified source VM: hardware version, memory, processor resources,storage requirements, VM configuration requirements, and networkconfiguration.
 4. The system of claim 1, wherein the processor isprogrammed to receive the request by receiving a plurality of requestseach having a priority value associated therewith, wherein the processoris further programmed to determine the resource requirements and selectthe candidate datastore or host for each of the plurality of VMs basedon the priority value.
 5. The system of claim 1, wherein the memory areafurther stores at least one identifier corresponding to at least one ofthe hosts on which none of the plurality of VMs should be deployed. 6.The system of claim 1, wherein the received request identifies athreshold quantity of resources to remain available on the selectedcandidate datastore or host post-deployment, and wherein the processoris programmed to select the candidate datastore or host by selectingcandidate datastore or host based at least in part on the identifiedthreshold quantity of resources.
 7. The system of claim 1, furthercomprising means for monitoring the deployment of the plurality of VMson the selected candidate datastores or hosts.
 8. The system of claim 7,further comprising means for automatic error recovery during thedeployment of the plurality of VMs on the selected candidate datastoresor hosts.
 9. A method comprising: storing an inventory of hosts anddatastores, said inventory describing resources associated with thehosts and datastores; receiving a request to select at least onecandidate datastore or host for a plurality of virtual machines (VMs)for deployment; determining resource requirements for the plurality ofVMs; automatically selecting, for each of the plurality of VMs, thecandidate datastore or host from the inventory of hosts and datastoresbased on the determined resource requirements and the resourcesassociated with the inventory of hosts and datastores; automaticallydeploying at least one of the plurality of VMs on the selected candidatedatastore or host; monitoring the inventory and updating, during saiddeploying, the assessment of the resources in the inventory based onchanges of resource availability; and automatically selecting, duringsaid deploying, another candidate datastore or host based on acomparison of the resource requirements and the updated assessment ofthe resources in the inventory prior to completion of deployment andcomplete deployment of the at least one of the plurality of VMs on theselected another candidate datastore or host, wherein at least one ofreceiving, automatically selecting the candidate datastore or host,automatically deploying, monitoring and updating, and automaticallyselecting the another candidate datastore or host is performed using atleast one processor of a computing device.
 10. The method of claim 9,wherein receiving the request comprises receiving a request identifyingone or more of the following: a datacenter, a cluster, a folder, and aquantity of the plurality of VMs to be deployed.
 11. The method of claim9, further comprising presenting the selected candidate datastore orhost to an administrator for authorization to perform said deploying.12. The method of claim 9, wherein automatically deploying the at leastone of the plurality of VMs comprises automatically deploying at leastone of the plurality of VMs without authorization from an administrator.13. The method of claim 9, wherein the received request specifies a timefor performing said deploying the at least one of the plurality of VMs,and wherein automatically deploying comprises automatically deployingthe at least one of the plurality of VMs at the specified time.
 14. Themethod of claim 9, wherein receiving the request comprises receiving arequest identifying a cluster of hosts, and wherein selecting thecandidate datastore or host comprises selecting the candidate datastorefrom a plurality of datastores accessible to the cluster of hosts. 15.The method of claim 9, further comprising performing a post-deploymentintegrity check by comparing a configuration of the deployed at leastone of the plurality of VMs to the resource requirements.
 16. The methodof claim 9, wherein selecting the candidate datastore or host comprisesscanning the plurality of datastores for one or more of the following:host compatibility, datastore compatibility, input/output load, memoryresources, processor resources, and network port group compatibility.17. One or more computer-readable storage media includingcomputer-executable instructions that, when executed, cause at least oneprocessor to place virtual machines by: storing an inventory of hostsand datastores, said inventory describing resources associated with thehosts and datastores; receiving a request to select at least onecandidate datastore or host for a plurality of virtual machines (VMs)for deployment; determining resource requirements for the plurality ofVMs; automatically selecting, for each of the plurality of VMs, thecandidate datastore or host from the inventory of hosts and datastoresbased on the determined resource requirements and the resourcesassociated with the inventory of hosts and datastores; automaticallydeploying at least one of the plurality of VMs on the selected candidatedatastore or host; monitoring the inventory and updating, during saiddeploying, the assessment of the resources in the inventory based onchanges of resource availability; and automatically selecting, duringsaid deploying, another candidate datastore or host based on acomparison of the resource requirements and the updated assessment ofthe resources in the inventory prior to completion of deployment andcomplete deployment of the at least one of the plurality of VMs on theselected another candidate datastore or host.
 18. The computer storagemedia of claim 17, wherein the request identifies one or more of thefollowing: a datacenter, a cluster, a folder, and a quantity of theplurality of VMs to be deployed.
 19. The computer storage media of claim17, wherein the computer-executable instructions further cause theprocessor to present the selected candidate datastore or host to anadministrator for authorization to perform said deploying.
 20. Thecomputer storage media of claim 17, wherein the received requestspecifies a time for performing deployment of the at least one of theplurality of VMs, and wherein the computer-executable instructionsfurther cause the processor to deploy the at least one of the pluralityof VMs at the specified time.